export * from './arrayToBits'
export * from './bitsToArray'

export function joinBits(...args: (boolean | number)[]): number {
	if (!args || !args.length) return 0
	let bits = 0
	for (let i = 0; i < args.length; i++) {
		if (args[i]) bits |= 1 << i;
	}
	return bits
}
